Skip to content

Phase 548: whiteboard primitive renderer adapter skeleton#220

Open
ExplodingUFO wants to merge 2 commits into
feature/phase-547-whiteboard-primitive-model-skeletonfrom
feature/phase-548-whiteboard-renderer-adapter-skeleton
Open

Phase 548: whiteboard primitive renderer adapter skeleton#220
ExplodingUFO wants to merge 2 commits into
feature/phase-547-whiteboard-primitive-model-skeletonfrom
feature/phase-548-whiteboard-renderer-adapter-skeleton

Conversation

@ExplodingUFO
Copy link
Copy Markdown
Owner

Summary

  • Add internal Core renderer-neutral whiteboard primitive scene snapshot, scene item, hit-test result, and adapter projection skeleton.
  • Prove rectangle/freehand projection, topmost z-index hit testing, edit-lifecycle evidence, and separation from graph scene/Avalonia renderer surfaces.
  • Update EN/ZH React Flow parity roadmap docs to replace Phase 548 TBD with GitHub Phase 548: whiteboard primitive renderer adapter skeleton #219 / avalonia-node-map-10p while leaving Phase 549/550 TBD.

Test Plan

  • dotnet test tests\AsterGraph.Editor.Tests\AsterGraph.Editor.Tests.csproj -c Release --filter WhiteboardPrimitiveRendererAdapterContractsTests -v:minimal
  • dotnet test tests\AsterGraph.Demo.Tests\AsterGraph.Demo.Tests.csproj -c Release --filter "FullyQualifiedName~ReactFlowParityRoadmapDocsTests" -v:minimal
  • dotnet test tests\AsterGraph.Demo.Tests\AsterGraph.Demo.Tests.csproj -c Release -v:minimal
  • dotnet build AsterGraph.sln -c Release -v:minimal
  • git diff --check

Stack

@ExplodingUFO ExplodingUFO force-pushed the feature/phase-548-whiteboard-renderer-adapter-skeleton branch from dd13dc5 to 30bb017 Compare May 13, 2026 04:26
@ExplodingUFO
Copy link
Copy Markdown
Owner Author

Blocking: the Phase 548 hit-test contract currently treats freehand primitives as filled rectangles.

GraphWhiteboardPrimitiveRendererAdapter.HitTest(...) sends every primitive through Contains(...), and Contains(...) only checks BoundsOrigin + BoundsSize. The freehand points projected into GraphWhiteboardPrimitiveSceneItem.Points are never used, so any click inside the freehand bounding box returns a hit even when it is far from the actual stroke. That would give future selection/edit/eraser paths false positives while the docs/tests claim topmost primitive hit-testing evidence for rectangle/freehand primitives.

Please either make HitTest kind-aware for freehand primitives, for example using segment-distance plus an explicit tolerance, and add a negative test for a point inside the freehand bounds but away from the stroke; or narrow the Phase 548 claim/tests so this slice does not present freehand hit-testing as proven.

@ExplodingUFO
Copy link
Copy Markdown
Owner Author

Addressed the freehand hit-test blocker in 3dad5ae.

What changed:

  • Added regression coverage for a point inside the freehand bounds but away from the stroke returning no hit.
  • Added positive coverage for a point near a freehand stroke segment returning the primitive hit.
  • Updated GraphWhiteboardPrimitiveRendererAdapter to keep rectangle hit-testing bounds-based while freehand hit-testing uses bounds as a fast reject and then segment-distance tolerance against the projected points.

Verification:

  • dotnet test tests\AsterGraph.Editor.Tests\AsterGraph.Editor.Tests.csproj -c Release --no-restore --filter FullyQualifiedName~WhiteboardPrimitiveRendererAdapterContractsTests --verbosity minimal => 5/5 passed
  • dotnet build AsterGraph.sln -c Release -v:minimal => 0 warnings, 0 errors
  • git diff --check => exit 0, CRLF notices only
  • GitHub checks on PR Phase 548: whiteboard primitive renderer adapter skeleton #220 head 3dad5aecd9ed7f4191a0a20073a8f2bdd6d347b1 are all passing, including hygiene-proof, framework matrix, linux/macos validation, contract-proof, and release-validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant